package cn.com.util;

public class ObjectToString {
	/**
	 * object 不存在空字符串
	 */
	public static String[] objtostr(Object[] obj) {
		String[] ss = null;
		if (obj.length != 0) {
			ss = new String[obj.length];
			for (int i = 0; i < obj.length; i++) {
				if (obj[i] != null) {
					ss[i] = obj[i].toString();
				} else {
					ss[i] = null;
				}
			}
		}
		return ss;
	}

	public static String[] objecttostr(Object[] obj) {
		String[] ss = null;
		if (obj.length != 0) {
			ss = new String[obj.length];
			for (int i = 0; i < obj.length; i++) {
				if (obj[i] != null && !obj[i].equals(""))
					ss[i] = obj[i].toString();
				else
					ss[i] = null;
			}
		}
		return ss;
	}
}
